package com.runen.infinitemovement.adapter;

import android.content.Context;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.runen.infinitemovement.R;
import com.runen.infinitemovement.model.entity.InformationListEntity;
import com.runen.infinitemovement.tool.CommonUtil;

/**
 * Create by LiaoDuanHong
 * Create on 2021/03/05 13:30
 */
public class MyLongRoadCollegeAdapter extends BaseQuickAdapter<InformationListEntity, BaseViewHolder> {
    public MyLongRoadCollegeAdapter(Context context) {
        super(R.layout.item_my_long_road_college);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, InformationListEntity item) {
        LinearLayout ll_collage_bg = baseViewHolder.getView(R.id.ll_collage_bg);
        TextView tv_collage_title = baseViewHolder.getView(R.id.tv_collage_title);
        tv_collage_title.setText(item.title);
        switch (baseViewHolder.getAdapterPosition()) {
            case 0:
                ll_collage_bg.setBackground(CommonUtil.getDrawable(R.drawable.bg_fffff1ef_cr_4dp));
                tv_collage_title.setTextColor(CommonUtil.getColor(R.color.color_FFD1681E));
                break;
            case 1:
                ll_collage_bg.setBackground(CommonUtil.getDrawable(R.drawable.bg_fffff3f6_cr_4dp));
                tv_collage_title.setTextColor(CommonUtil.getColor(R.color.color_FFD9526B));
                break;
            case 2:
                ll_collage_bg.setBackground(CommonUtil.getDrawable(R.drawable.bg_ffedf6ff_cr_4dp));
                tv_collage_title.setTextColor(CommonUtil.getColor(R.color.color_FF407DDD));
                break;
        }

    }
}
